﻿<Window x:Class="eNursePHR.userInterfaceLayer.WindowNewItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ui="clr-namespace:eNursePHR.userInterfaceLayer"
    Title="New diary entry" 
    SizeToContent="Height" Width="400"
    Background="{StaticResource BlueTheme}"
    Loaded="Window_Loaded" Icon="Images\New.png" 
    ResizeMode="CanMinimize"
       >
	<Window.Resources>
		<ui:DateTimeConverter x:Key="DateTimeConverter"></ui:DateTimeConverter>

	</Window.Resources>
		<StackPanel>
        <ToolBarTray>
            <ToolBar>
                <Button x:Name="btnSave"  Click="btnSave_Click">
                    <Image x:Name="imgBtnSave" Source="Images\Save.png" Height="15" ToolTip="Save item to careplan" />
                </Button>
				<Button x:Name="btnInsertHyperlink" Click="btnInsertHyperlink_Click">
					<Image x:Name="imgBtnInsertHyperlink" Source="Images\URL.png" Height="15" ToolTip="Insert web-address" />
				</Button>
				<Button x:Name="btnInsertImage" Click="btnInsertImage_Click" IsEnabled="False" >
					<Image x:Name="imgBtnInsertImage" Source="Images\OpenFolder.png" Height="15" ToolTip="Insert image" />
				</Button>
			</ToolBar>
        </ToolBarTray>
        
        <StackPanel x:Name="spNewItem" Margin="5,0,5,0">

            <StackPanel Orientation="Horizontal" Margin="0,5,0,5">
                <Image Source="Images\New.png" />
                <TextBlock FontSize="20" FontWeight="UltraBold" Text="New diary entry"
                           VerticalAlignment="Center" />
            </StackPanel>
            <TextBlock Margin="0,0,0,0"  Text="Title" FontWeight="UltraBold"  />
            
            <TextBox x:Name="tbTitle" TextChanged="tbTitle_TextChanged" FontSize="15" FontWeight="UltraBold" MaxHeight="300" TextWrapping="Wrap"  >
              <TextBox.Text>
                  <Binding Path="Title" UpdateSourceTrigger="PropertyChanged" >
                      <Binding.ValidationRules>
                          <ui:EmptyStringRule />
                      </Binding.ValidationRules>
                  </Binding>
              </TextBox.Text>
            </TextBox>
            
            <TextBlock Margin="0,5,0,0" Text="Description" FontWeight="UltraBold" />
           
            <RichTextBox x:Name="rtbDescription" Height="300" 
              TextChanged="rtbDescription_TextChanged"
              IsDocumentEnabled="True"
              VerticalScrollBarVisibility="Auto"
             
              
             
                />
        </StackPanel>
        
        <!--<TextBlock Text="Attachments (resources)" FontWeight="Bold" />
        <ListBox x:Name="lbAttachments" Drop="lbAttachments_Drop" Height="100" MaxHeight="150" SelectionChanged="lbAttachments_SelectionChanged"  AllowDrop="True" />
      
        <Image x:Name="imgShow" Height="150" Visibility="Collapsed" />-->
       
        <!--<StackPanel x:Name="spNewHistory" Margin="5,0,5,0" Visibility="Collapsed">
          <StackPanel Orientation="Horizontal">
              <TextBlock Text="Created by " FontWeight="Bold" />
              <TextBlock Text="{Binding Path=CreatedBy, Mode=OneWay}"/>
            
              <TextBlock Text=" at "  /> 
             
              <TextBlock Text="{Binding Path=CreatedDate, Mode=OneWay, Converter={StaticResource DateTimeConverter}}"/>
           </StackPanel>
           
            <StackPanel x:Name="spNewItemUpdate"  Orientation="Horizontal">
              <TextBlock Text="Updated by " FontWeight="Bold" />
              <TextBlock Text="{Binding Path=UpdatedBy, Mode=OneWay}"/>
         
             <TextBlock Text=" at " />
             <TextBlock Text="{Binding Path=UpdatedDate, Mode=OneWay, Converter={StaticResource DateTimeConverter}}"/>
           </StackPanel>
         </StackPanel>-->
         
         <StatusBar Margin="0,5,0,0">
           <StatusBarItem>
             <TextBlock x:Name="sbInformation" />
           </StatusBarItem>
         </StatusBar>   
           
     </StackPanel>
</Window>
